package com.itheima.dao;



import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;



import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;


public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User findUserByUserName(@Param("username") String username);

    List<User> findPage(@Param("queryString") String queryString);
    void add(User user);

    void setUserAndRole(@Param("params") List<Map> params);


    Set<Role> findAllRole();

    User findById(@Param("id")Integer id);

    List<Integer> findRoleIdsByUserId(Integer id);

    void edit(User user);

    void deleteRelation(@Param("userId") Integer userId);

    void delete(@Param("id")Integer id);

    Integer findUserById(@Param("id")Integer id);

}